<%--
  Created by IntelliJ IDEA.
  User: TT
  Date: 2020/9/3
  Time: 15:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <link rel="stylesheet" href="css/index2.css">
    <script type="text/javascript">
        $(function () {
            $.post("idlist.do",{"sid":${param.sid}},function(num){
                $("[name=sname]").val(num.sname);
                $("[name=scome]").val(num.scome);
                $("[name=itime]").val(num.itime);
                for (var i in num.clist){
                    var ss = num.clist[i].cname;
                    $.post("geshou.do",function (s) {
                        for (var i in s){
                            if (ss.indexOf(s[i].cname)>=0){
                                $("#tutu").append("<input type='checkbox' checked name='gs' value='"+s[i].cid+"'>"+s[i].cname)
                            }else {
                                $("#tutu").append("<input type='checkbox' name='gs' value='"+s[i].cid+"'>"+s[i].cname)
                            }
                        }
                    },"json");
                }
            },"json");
        })
    </script>
</head>
<body>
<center><h1>歌曲详情</h1></center>
<form action="list.do" method="post">
    编号:<input type="text" name="sid" value="${param.sid}" readonly="readonly"><br>
    歌曲名:<input type="text" name="sname" readonly="readonly"><br>
    来源:<input type="text" name="scome" readonly="readonly"><br>
    发布时间:<input type="date" name="itime" readonly="readonly"><br>
    歌手:<div id="tutu">
</div>
    <input type="submit" value="返回">
</form>
</body>
</html>
